package com.hymjweb.demo.config.pagehelper;

import com.github.pagehelper.PageHelper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Properties;

@Configuration
public class PageHelperConfiguration {

    @Bean
    public PageHelper pageHelper(){
        PageHelper helper=new PageHelper();

        Properties p=new Properties();
        p.setProperty("offsetAsPageNum", "true");
        p.setProperty("rowBoundsWithCount", "true");
        p.setProperty("reasonable", "true");
        helper.setProperties(p);
        return  helper;
    }

}
